<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        div {
            box-sizing: border-box;
        }

        .parent {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        img {
            width: 298px;
        }

        .item {
            width: 300px;
            height: 440px;
            background-color: rgb(244, 244, 244);
            border: 1px solid gray;
            border-radius: 5px;
        }

        .center {
            height: 190px;
            padding: 10px;
            border-top: 1px solid grey;
        }

        .top {
            height: 200px;
        }

        .bottom {
            height: 48px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid grey;
            padding: 0px 10px;
        }


        input {
            background-color: #cedffc;
            border-radius: 5px;
            width: 130px;
            height: 30px;
            border: none;
        }

        .price {
            color: red;
            line-height: 48px;
            font-weight: 800;
            font-size: 18px;
        }
    </style>
</head>

<body>
    <div class="parent">
        <div class="item">
            <div class="top"><img src="https://oss.9ihub.com/test/2025-09-26-10-21-34.png" alt=""></div>
            <div class="center">
                <h3>商品标题1</h3>
                <p>简要描述...</p>
            </div>
            <div class="bottom">
                <div class="price">￥199</div>
                <input type="button" name="" id="" value="加入购物车">
            </div>
        </div>
        <div class="item">
            <div class="top"><img src="https://oss.9ihub.com/test/2025-09-26-10-21-56.png" alt=""></div>
            <div class="center">
                <h3>商品标题2</h3>
                <p>更长一些的描述，用于测试等高。</p>
            </div>
            <div class="bottom">
                <div class="price">￥259</div>
                <input type="button" name="" id="" value="加入购物车">
            </div>
        </div>
        <div class="item">
            <div class="top"><img src="https://oss.9ihub.com/test/2025-09-26-10-22-27.png" alt=""></div>
            <div class="center">
                <h3>商品标题3</h3>
                <p>简要描述...</p>
            </div>
            <div class="bottom">
                <div class="price">￥99</div>
                <input type="button" name="" id="" value="加入购物车">
            </div>
        </div>
    </div>
</body>

</html>